<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我的消息 - <?php echo $cfg_webname; ?></title>
<link href="templets/style/css/reset.css" rel="stylesheet" type="text/css">
<link href="templets/style/css/member.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="templets/js/j.js"></script>
<script type="text/javascript" src="templets/js/load.js"></script>
<script type="text/javascript" src="templets/js/leftmenu.js"></script>
<script type="text/javascript" language='javascript' src="templets/js/main.js"></script>
<script type="text/javascript" src="templets/js/checkSubmit.js"></script>
<script type="text/javascript">
function go_jump2(url,page,max){
	var g = /^[1-9]*[1-9][0-9]*$/;
	if(!g.test(page)){
		alert("页码格式不正确！");
		return;
	}else if(page > max){
		alert("此页码不存在！");
		return;
	}
	window.location.href=url;
}

<!--
if(moz == null) 
{
	var ie = document.all != null;
	var moz = !ie && document.getElementById != null && document.layers == null;
}
if(moz) {
	extendEventObject();
	extendElementModel();
	emulateAttachEvent();
}

function delArc(mid){
	var qstr=getCheckboxItem();
	if(mid==0) mid = getOneItem();
	if(window.confirm("确定删除吗？"))
	{
		location="pm.php?dopost=del&ids="+qstr+"&folder=<?php echo $folder;?>";
	}
}

//获得选中文件的文件名
function getCheckboxItem()
{
	var allSel="";
	if(document.form2.aid.value) return document.form2.aid.value;
	for(i=0;i<document.form2.aid.length;i++)
	{
		if(document.form2.aid[i].checked)
		{
			if(allSel=="")
				allSel=document.form2.aid[i].value;
			else
				allSel=allSel+"`"+document.form2.aid[i].value;
		}
	}
	return allSel;
}

//获得选中其中一个的id
function getOneItem()
{
	var allSel="";
	if(document.form2.aid.value) return document.form2.aid.value;
	for(i=0;i<document.form2.aid.length;i++)
	{
		if(document.form2.aid[i].checked)
		{
				allSel = document.form2.aid[i].value;
				break;
		}
	}
	return allSel;
}

function selAll()
{
	for(i=0;i<document.form2.aid.length;i++)
	{
		if(!document.form2.aid[i].checked)
		{
			document.form2.aid[i].checked=true;
		}
	}
}
function noSelAll()
{
	for(i=0;i<document.form2.aid.length;i++)
	{
		if(document.form2.aid[i].checked)
		{
			document.form2.aid[i].checked=false;
		}
	}
}
-->
</script>
</head>
<body>


<!--head-->
<?php include(DEDEMEMBER. "/templets/head.htm"); ?>

<div class="main">
<?php include(DEDEMEMBER."/templets/menu.php"); ?> 

<div class="main_right">

<div class="common_title">收件箱</div>

<div class="znxx_class">
<a href="pm.php" class="<?php if($folder=="inbox") echo 'cur'; ?>">全部 (<?php echo $s['nums'];?>)</a>
<a href="pm.php?folder=l" class="<?php if($folder=="l") echo 'cur'; ?>" >留言 (<?php echo $l['nums'];?>)</a>
<?php if($cfg_ml->isAdmin==1){ ?>
<a href="pm.php?folder=t" class="<?php if($folder=="t") echo 'cur'; ?>">提现 (<?php echo $t['nums'];?>)</a>
<a href="pm.php?folder=f" class="<?php if($folder=="f") echo 'cur'; ?>">反馈 (<?php echo $f['nums'];?>)</a>
<a href="pm.php?folder=sm" class="<?php if($folder=="sm") echo 'cur'; ?>">实名 (<?php echo $sm['nums'];?>)</a>
<?php } ?>
</div>

<form name="form2">
<input type='hidden' name='dopost' value='del' />
<table class="znxx_table">
<thead>
<tr>
<th style="width:40%">标题</th>
<th style="width:15%">发件人</th>
<th style="width:10%">状态</th>
<th style="width:18%">发布时间</th>
<th style="width:5%">操作</th>
</tr>
</thead>
<tbody>
{dede:datalist}
<tr>
<td>
<input type="checkbox" name="aid" value="{dede:field.id/}" style=" margin-left:5px"/>
<?php if($fields['hasview']==0) echo "<a href='pm.php?dopost=read&id={$fields['id']}'>{$fields['subject']}</a>";
else echo "<a href='pm.php?dopost=read&id={$fields['id']}'>{$fields['subject']}</a>";?>
</td>
<td><a href="index.php?uid=<?php echo $fields['floginid']; ?>" target="_blank"> <?php echo $fields['floginid']; ?> </td>
<td>
<?php 
$readmsg = ($fields['hasview']==0 ? "<span class='blue'>未阅读</span>" : "<span class='red'>已阅读</span>");
echo $readmsg;
?>
</td>
<td>
<?php
echo MyDate('y-m-d H:i:s',$fields['sendtime']);
?>
</td>
<td>
<a href="pm.php?dopost=read&id={dede:field.id/}">查看</a>
<a href="pm.php?dopost=del&ids={dede:field.id/}" onclick="javascript:return confirm('确定删除{dede:field.subject/}吗？');">删除</a>
</td>
</tr>
{/dede:datalist}
</tbody>
</table>
</form>

<div class="znxx_tools">
<div class="znxx_tools_left">
<div class="yc">
<input type="button" class="stows-sub" onclick="selAll()" value="全选" />
<input type="button" class="stows-sub" onclick="noSelAll()" value="取消" />
<input type="button" class="stows-sub stows-yc" onclick="delArc(0)" value="移除" />
</div>
</div>
<style type="text/css">
.pageList a:hover,.pageList strong{background:#6aa6f1;}
</style>
<div class="pageList">{dede:pagelist listsize=5 /}</div>
</div>


</div>

</div>

<!--footer-->
<?php include(DEDEMEMBER. "/templets/footer.htm"); ?>

<script>
	//会员升级
	var typeid = document.querySelector('#typeid');
	var divs = document.querySelectorAll('.hysj_jiage li div');
	for(var i=0,len=divs.length;i<len;i++){
		divs[i].onclick = divCLickHandler;
	}
	function divCLickHandler(e){
		for(var i=0,len=divs.length;i<len;i++){
			divs[i].className = '';
		}
		this.className = 'cur';
		typeid.value = this.getAttribute('_typeid');
	}
</script>
<script>
	//左边导航
	var as = document.querySelectorAll('.left_menu a');
	var spans = document.querySelectorAll('.left_menu .icons');
	for(var i=0,len=as.length;i<len;i++){
		
		spans[i].clazz = spans[i].className;
		as[i].index = i;
		as[i].onmouseenter = mouseenterHandler;
		as[i].onmouseleave = mouseleaseHandler;
	}
	function mouseenterHandler(e){
		if(!/_h$/.test(spans[this.index].clazz)){
			spans[this.index].className = spans[this.index].clazz + '_h';
		}
	}
	function mouseleaseHandler(e){
		spans[this.index].className = spans[this.index].clazz;
	}
	
	//左右等高布局
	var main_left = document.querySelector('.main_left');
	var main_right = document.querySelector('.main_right');
	if(main_left.offsetHeight<main_right.offsetHeight){
		main_left.style.height = main_right.offsetHeight + 'px';
	}
</script>

</body>
</html>